﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Includes;

namespace SyncroneModule
{
   /// <summary>
   /// Provides neccessairy functions for persisting and retrieving patients and their data
   /// </summary>
   public interface IPersistSync
   {
        /// <summary>
        /// Clears the informed flags for all patients whose next check is due in less than timeDif seconds
        /// </summary>
        /// <param name="timeDif"> Max time to next check in seconds </param>
        void clearInformedFlags(uint timeDif);

        /// <summary>
        /// Gets name and number of the People whose Info is late
        /// </summary>
        /// <param name="timeDif"> The timedifference in seconds that determines wether the Info is late or not. </param>
        /// <returns> An array of CallInfoSynch containing the name and number </returns>
        CallInfoSync[] getTelListInfoLate(uint timeDif);

        /// <summary>
        /// Gets name and number of the Peaple whose Info is very late
        /// </summary>
        /// <param name="timeDif"> The timedifference in seconds that determines wether the Info is very late or not. </param>
        /// <returns> An array of CallInfoSynch containing the name and number </returns>
        CallInfoSync[] getTelListInfoVeryLate(uint timeDif);

        /// <summary>
        /// Gets name and number of the Peaple whose KR flag has been set to long
        /// </summary>
        /// <param name="timeDif"> The timedifference in seconds that determines wether the KR flag is already set to long. </param>
        /// <returns> An array of CallInfoSynch containing the name and number </returns>
        CallInfoSync[] getTelListKR(uint timeDif);

        /// <summary>
        /// Gets the Flags of the patient with the telephonenumber
        /// </summary>
        /// <param name="tel"> The telephonenumber of the patient </param>
        /// <returns> The Flags which belong to the telephonenumber </returns>
        Flags getFlags(String tel);

        /// <summary>
        /// Sets the flags wich belong to the patient found throug the telephonenumber
        /// </summary>
        /// <param name="tel"> The telephonenumber of the patient </param>
        /// <param name="flags"> The status flags wich are to be set </param>
        /// <returns> The Nothingness of a Cookie of Void </returns>
        void setFlags(String tel, Flags flags);

        /// <summary>
        /// Adds a log to the logs within the Persistence
        /// </summary>
        /// <param name="tel"> The telephonenumber of the patient the log belongs to </param>
        /// <param name="log"> The log that is to be added </param>
        /// <returns> The Nothingness of a Cookie of Void </returns>
        void addLog(String tel, String log);
   }
}
